home *** CD-ROM | disk | FTP | other *** search
- /*
- Storage.h
-
- PC relative storage for MPW code resources.
-
- by Patrick C. Beard.
-
- Usage:
- Store(void* p) stuffs a pointer pc-relative.
- void* Retrieve() returns a previously stored value.
- void** Storage() provides direct access.
- */
-
- #ifndef __STORAGE__
- #define __STORAGE__
-
- void** __location() = { 0x6104, 0x0000, 0x0000, 0x201F };
- static void** Storage() { return __location(); }
- inline void Store(void* p) { *Storage() = p; }
- inline void* Retrieve() { return *Storage(); }
-
- #endif
-